package com.hyt.it.ogt.kq.service.canal;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.PreDestroy;
import javax.annotation.Resource;

/**
 * @author 刘恒活
 * @since 2021/03/17
 */

@Component
@Slf4j
public class ShutdownSystem {
    @Resource
    private CanalCommandLineRunner canalCommandLineRunner;

    @PreDestroy
    public void stop() {
        log.info("========服务器关闭开始=======");
        canalCommandLineRunner.close();
        log.info("========服务器关闭结束=======");
    }
}
